/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.tue.nl.aa;

/**
 * Class to represent a job in the (Greedy-)Ordered Scheduling Algorithm.
 * @author waldo
 */
public class JobDTO implements Comparable<JobDTO> {
    
    private long t;
    
    /**
     * Constructor.
     * @param t , time required to complete the job.
     */
    public JobDTO( long time ){
        t=time;
    }
    
    /**
     * @return time required to complete the job.
     */
    public long getTime(){ return t; }

    /**
     * Implementation of Comparable.
     */
    @Override public int compareTo(JobDTO job) {
        if( this.getTime()<job.getTime() ) return -1;
        else if( this.getTime()>job.getTime() ) return 1;
        else return 0;
    }   

}
